<template>
	<div class="product_detail">
		<div>商品名称:{{productName}}</div>
		<p>单价500g/{{productPrice}}元</p>
	</div>

</template>

<script>
	export default {
		data(){
			return{
				productName:'',
				productPrice:''
			}
		},
		methods:{

		},
		mounted(){
			if(this.$route.query.name){
				this.productName = this.$route.query.name;
				this.productPrice = this.$route.query.price;
			}
			if(this.$route.params.name){
				this.productName = this.$route.params.name;
				this.productPrice = this.$route.params.price;
			}
			
		}
	}

</script>

<style>


</style>